<?xml version="1.0" encoding="UTF-8"?>
<%@ page contentType="text/xml;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="javax.jdo.PersistenceManager" %>
<%@ page import="gurps.Character" %>
<%@ page import="guestbook.PMF" %>
<characters>
<%
    PersistenceManager pm = PMF.get().getPersistenceManager();
    String query = "select from " + Character.class.getName();
    List<Character> characters = (List<Character>) pm.newQuery(query).execute();
    for (Character c : characters) 
	{
	%>
	<character id="<%= c.getId() %>" name="<%= c.getName() %>" st="<%= c.getStrength() %>" dx="<%= c.getDexterity() %>" iq="<%= c.getIntelligence() %>" ht="<%= c.getHealth() %>">
		<desc><![CDATA[<%= c.getDescription() %>]]></desc>
	</character>
	<%
    }
    pm.close();
%>
</characters>
